package com.ruoyi.domain;

import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
public class SysUser extends BaseEntity {

	private Long userId;
	
	private Long deptId;
	
	private String userName;
	
	private String nickName;
	
	private String email;
	
	private String phonenumber;
	
	private Integer sex;
	
	private String avatar;
	
	private String password;
	
	private String delFlag;
	
	private String status;
	
	private String loginIp;
	
	private Date loginDate;
	
	private List<SysRole> roles;
	
	public static boolean isAdmin(Long userId) {
			return userId != null && 1L == userId;
	}

	public boolean isAdmin() {
		return isAdmin(this.userId);
	}
}

